package com.medical.literature.document.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 文献关键词关联实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("literature_keyword")
public class LiteratureKeyword {
    
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 文献ID
     */
    private Long literatureId;

    /**
     * 关键词ID
     */
    private Long keywordId;

    /**
     * 在该文献中的权重
     */
    private BigDecimal weight;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    // 手动添加getter/setter方法，确保Lombok注解生效
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public Long getLiteratureId() {
        return literatureId;
    }
    
    public void setLiteratureId(Long literatureId) {
        this.literatureId = literatureId;
    }
    
    public Long getKeywordId() {
        return keywordId;
    }
    
    public void setKeywordId(Long keywordId) {
        this.keywordId = keywordId;
    }
    
    public BigDecimal getWeight() {
        return weight;
    }
    
    public void setWeight(BigDecimal weight) {
        this.weight = weight;
    }
    
    public LocalDateTime getCreateTime() {
        return createTime;
    }
    
    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
}